import { defineStore } from 'pinia'
import { ref } from 'vue'
import { getCategoryService } from '@/apis/layout.js'

export const useCategoryStore = defineStore('category', () => {
  const category = ref([])
  const getCategory = async () => {
    const res = await getCategoryService()
    category.value = res.result
  }
  return {
    category,
    getCategory
  }
})